-
Notifications
You must be signed in to change notification settings - Fork 2
feat(dom): DOM - toHaveDescription #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
SbsCruz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Juandi!
I just left some comments for you to review, thanks for working on this 🚀
| }; | ||
|
|
||
| /** | ||
| * Normalizes text by collapsing whitespace and trimming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the description of this function, but i think it would be better if we keep this file with no comments, wdyt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it would be better to keep this file with no comments!
| * @param text - The text to normalize. | ||
| * @returns The normalized text. | ||
| */ | ||
| export function normalizeText(text: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the export for here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! We don't need the exporthere. Thanks!
| * @param expectedDescription | ||
| * - Optional expected description (string or RegExp). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you put this in one line please so it has same structure as the other matchers please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to put like that because of the lenght of the line due to linter configuration!
Added toHaveDescription matcher.